<!-- secretsmanager secrets -->
<script id="services.secretsmanager.regions.id.secrets.partial" type="text/x-handlebars-template">
    <div id="resource-name" class="list-group-item active">
        <h4 class="list-group-item-heading">{{name}}</h4>
    </div>
    <div class="list-group-item">
        <h4 class="list-group-item-heading">Information</h4>
        <div class="list-group-item-text item-margin">Name: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.name"><samp>{{value_or_none name}}</samp></span></div>
        <div class="list-group-item-text item-margin">ARN: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.arn"><samp>{{value_or_none arn}}</samp></span></div>
        <div class="list-group-item-text item-margin">Description: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.description"><samp>{{value_or_none description}}</samp></span></div>
        <div class="list-group-item-text item-margin">Last Changed Date: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.last_changed_date"><samp>{{format_date last_changed_date}}</samp></span></div>
        <div class="list-group-item-text item-margin">Last Accessed Date: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.last_accessed_date"><samp>{{format_date last_accessed_date}}</samp></span></div>
        <div class="list-group-item-text item-margin">KMS Key: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.kms"><samp>{{value_or_none kms}}</samp></span></div>
        <div class="list-group-item-text item-margin">Rotation: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.rotation">{{convert_bool_to_enabled rotation}}</span></div>
        {{#if rotation}}
        <div class="list-group-item-text item-margin">Rotation Lambda ARN: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.rotation_lambda_arn"><samp>{{value_or_none rotation_lambda_arn}}</samp></span></div>
        <div class="list-group-item-text item-margin">Rotation Interval: <span id="secretsmanager.regions.{{region}}.secrets.{{@key}}.rotation_interval"><samp>{{value_or_none rotation_interval}}</samp></span></div>
        {{/if}}
    </div>
    {{#if policy.Statement}}
    <div class="list-group-item">
        {{> accordion_policy name = 'Resource Permissions ' policy_path = (concat 'secretsmanager.regions' region 'secrets' @key 'policy') document = policy}}
    </div>
    {{/if}}
</script>

<script>
    Handlebars.registerPartial("services.secretsmanager.regions.id.secrets", $("#services\\.secretsmanager\\.regions\\.id\\.secrets\\.partial").html());
</script>

<!-- Single secretsmanager secret template -->
<script id="single_secretsmanager_secret-template" type="text/x-handlebars-template">
    {{> modal-template template='services.secretsmanager.regions.id.secrets'}}
</script>
<script>
    var single_secretsmanager_secret_template = Handlebars.compile($("#single_secretsmanager_secret-template").html());
</script>
